package org.csu.mypetstore.api.service;

import org.csu.mypetstore.api.common.CommonResponse;
import org.csu.mypetstore.api.entity.Category;
import org.csu.mypetstore.api.entity.Item;
import org.csu.mypetstore.api.entity.Product;
import org.csu.mypetstore.api.vo.ItemVO;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

public interface CatalogService {
    //获取categories
    public CommonResponse<List<Category>> getCategoryList();

    //根据Id获取category
    public CommonResponse<Category> getCategoryById(@PathVariable("id") String categoryId);

    //根据Id更新category
    public CommonResponse<Category> updateCategoryById(Category category);

    //增加category
    public CommonResponse<Category> insertCategory(@PathVariable("id") String categoryId,String name,String description);

    //根据categoryId获取products
    public CommonResponse<List<Product>> getProductByCatid(@PathVariable("id") String categoryId);

    //根据productId获取product
    public CommonResponse<Product> getProductByProid(@PathVariable("id") String productId);

    //根据模糊查询获取product
    public CommonResponse<List<Product>> getProductLikeProid(@PathVariable("id") String productId);

    //根据productId获取items
    public CommonResponse<List<Item>> getItemByProid(@PathVariable("id") String productId);

    //根据itemId获取item
    public CommonResponse<Item> getItemByItemid(@PathVariable("id") String itemId);

    //根据productId获取Item总信息
    public CommonResponse<List<ItemVO>> getItemVOByProductId(String productId);


}
